/*
 * RenzoImageManager.h
 *
 *  Created on: Aug 30, 2009
 *      Author: sonhua
 */

#ifndef _RENZO_IMAGE_MANAGER_
#define _RENZO_IMAGE_MANAGER_

#include "RenzoMustHave.h"

namespace Renzo {

class RENZODERER_API ImageManager {
public:
	ImageManager();
	virtual ~ImageManager();

/*
public:
	static ImageManager* instance();
private:
	static ImageManager* imgManager;
*/

public:
	Image* load(String file);	
	void unload(Image* img);
protected:
	virtual void loadInternal(String file, void*& pixels, PixelFormat& fmt, Size& size) = 0;
protected:
	typedef std::map<String, Image*> ImageList;
	ImageList images;
};

}

#endif /* RENZOIMAGEMANAGER_H_ */
